package cn.bby.query.server.application.manager;

import cn.bby.query.server.domain.service.dto.DataChangeEvent;
import cn.bby.query.server.domain.service.update.DataUpdateHandleService;
import jakarta.annotation.Resource;

import java.util.List;

/**
 * @author wangbenyin
 * @version 1.0
 * @date 2025/06/07
 * @since 17
 */
public abstract class DataChangeEventManager {
    @Resource
    private DataUpdateHandleService dataUpdateHandleService;

    abstract public void sendEvent(List<String> payloads);

    public void handleEvent(List<DataChangeEvent> changeEvents) {
        dataUpdateHandleService.handleUpdateDataEvent(changeEvents);
    }
}
